import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity('resources')
export class Resource {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column()
  type: string;

  @Column({ nullable: true })
  provider: string;

  @Column({ nullable: true })
  region: string;

  @Column({ nullable: true })
  instanceId: string;

  @Column({ nullable: true })
  size: string;

  @Column({ default: 'active' })
  status: string;

  @Column({ nullable: true })
  tags: string;

  @Column({ type: 'float', default: 0 })
  cost: number;

  @CreateDateColumn()
  createdAt: Date;

  @UpdateDateColumn()
  updatedAt: Date;
} 